package com.demo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigInteger;
import java.time.LocalDateTime;

@Data
@TableName("tb_reply")
public class Reply {
//    回复的编号
    @TableId(type= IdType.AUTO,value = "r_id")
    @TableField(value = "r_id")
    private Long id;
//    回复所属评论的ID
    @TableField(value="r_cid")
    private Long cid;
    @TableField(value = "r_from_uid")
    private Long fromUid;
//    发布回复的用户昵称
    @TableField(value = "r_from_unickname")
    private String fromUnickname;
    //    接收回复的用户学号
    @TableField(value = "r_to_uid")
    private Long toUid;
//    接收回复的用户昵称
    @TableField(value = "r_to_unickname")
    private String toUnickname;
    @TableField(value = "r_content")
    private String content;
    @TableField(value = "r_release_time")
    @JsonFormat(timezone = "GMT+8",pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime releaseTime;
//    回复的点赞数
    @TableField(value = "r_likes")
    private int likes;
//    回复的阅读状态（0—已读1—未读）
    @TableField(value = "r_read_status")
    private int readStatus;
}
